﻿<!DOCTYPE html>
<html>
	<meta charset="UTF-8"/>
	<head>
		<script>
			window.onload = function(){
				var now = new Date();
				var time = document.getElementById("time");
				var time2 = document.getElementById("time2");
				var time3 = document.getElementById("time3");
				var h = 0;
				var m = 8;
				var s = 59;
				var timer1 = setInterval(function(){
					time.innerHTML = +h < 10 ? "0" + h : h;
					h -= 1;
					
					if(h == -1){
						clearInterval(timer1);
						time.innerHTML = "00";
					}
				},10*10*10)
				var timer2 = setInterval(function(){
					time2.innerHTML = +m < 10 ? "0" + m : m;
					m -= 1;
					if(h == -1 && m == -1){
						clearInterval(timer2);
						time2.innerHTML = "00";
						
					}
					else if(m == -1){
						m = 9;
						
					}
				},10*10)
				var timer3 = setInterval(function(){
					time3.innerHTML =  +s < 10 ? "0" + s : s;
					s -= 1;
					console.log(h);
					console.log(m);
					if(h == -1 && m == -1 && s == -1){
						console.log(s);
						clearInterval(timer3);
						time3.innerHTML = "00";
					}
					if(s == -1){
						s = 59;
					}
				},10)
			}
		</script>
	</head>
	<body>
		<span id="time">01</span>
		<span id="time2">9</span>
		<span id="time3">59</span>
		
		
				<a href="#"><img src="images/img60.jpg" /></a>
				<a href="#"><img src="images/img61.jpg" /></a>
				<a href="#"><img src="images/img62.jpg" /></a>
	</body>
</html>